//
//  MujiApplicationStateManagementProtocol.h
//
//  Created by Matt Austin on 9/19/14.
//  Copyright (c) 2014 EnglishCentral, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

@class MujiApplicationLifecycle;


/*!
 @typedef enum MujiApplicationStateTransition
 */
typedef NS_ENUM(NSUInteger, MujiApplicationStateTransition)
{
    /*!
     Application did finish launching.
     */
    MujiApplicationStateTransitionDidFinishLaunching,
    /*!
     Will enter foreground.
     */
    MujiApplicationStateTransitionWillEnterForeground,
    /*!
     Will terminate.
     */
    MujiApplicationStateTransitionWillTerminate,
    /*!
     Will resign active.
     */
    MujiApplicationStateTransitionWillResignActive,
    /*!
     Did enter background.
     */
    MujiApplicationStateTransitionDidEnterBackground,
    /*!
     Did become active. 
     */
    MujiApplicationStateTransitionDidBecomeActive
};

/*!
 @protocol MujiApplicationStateManagementProtocol
 @abstract Provides optional methods to handle all available application states.
 */
@protocol MujiApplicationStateManagementProtocol <NSObject>

@optional

/*!
 @method manageApplicationStateTransition:
 
 @param state
 */
- (void)manageApplicationStateTransition:(MujiApplicationStateTransition)stateTransition;

/*!
 @method
 @abstract Mangages the application state transition with additional information about the application lifecycle.
 
 @param stateTransition      The application state that has transitioned.
 @param applicationLifecycle Additional information about the current application lifecycle.
 */
- (void)manageApplicationStateTransition:(MujiApplicationStateTransition)stateTransition withApplicationLifecycle:(MujiApplicationLifecycle *)applicationLifecycle;



@end
